/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author pborrego
 */
@Entity
@Table(name = "PROFILES")
@NamedQueries({@NamedQuery(name = "Profiles.findAll", query = "SELECT p FROM Profiles p"), @NamedQuery(name = "Profiles.findByProfileid", query = "SELECT p FROM Profiles p WHERE p.profileid = :profileid"), @NamedQuery(name = "Profiles.findByDeliciousid", query = "SELECT p FROM Profiles p WHERE p.deliciousid = :deliciousid"), @NamedQuery(name = "Profiles.findByBloggerid", query = "SELECT p FROM Profiles p WHERE p.bloggerid = :bloggerid"), @NamedQuery(name = "Profiles.findByName", query = "SELECT p FROM Profiles p WHERE p.name = :name")})
public class Profiles implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "PROFILEID")
    private Integer profileid;
    @Column(name = "DELICIOUSID")
    private Integer deliciousid;
    @Column(name = "BLOGGERID")
    private Integer bloggerid;
    @Basic(optional = false)
    @Column(name = "NAME")
    private String name;

    public Profiles() {
    }

    public Profiles(Integer profileid) {
        this.profileid = profileid;
    }

    public Profiles(Integer profileid, String name) {
        this.profileid = profileid;
        this.name = name;
    }

    public Integer getProfileid() {
        return profileid;
    }

    public void setProfileid(Integer profileid) {
        this.profileid = profileid;
    }

    public Integer getDeliciousid() {
        return deliciousid;
    }

    public void setDeliciousid(Integer deliciousid) {
        this.deliciousid = deliciousid;
    }

    public Integer getBloggerid() {
        return bloggerid;
    }

    public void setBloggerid(Integer bloggerid) {
        this.bloggerid = bloggerid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (profileid != null ? profileid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Profiles)) {
            return false;
        }
        Profiles other = (Profiles) object;
        if ((this.profileid == null && other.profileid != null) || (this.profileid != null && !this.profileid.equals(other.profileid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.Profiles[profileid=" + profileid + "]";
    }

}
